/**
*      author: Y_Yao
*      created: 2025-04-18 16:01:10
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
int n,m;

int dp[100][10][100];
int ans,len;
vector<int> cnt1,e,d;

void solve()
{
    cin >> n >> m;
    cnt1.push_back(0);
    e.push_back(0);
    d.push_back(0);
    
    for(int i = 0;i < (1 << n);i++)
    {
        if(((i << 1) | (i >> 1)) & i) continue;
        int cur = 0,j = i;
        while(j)
        {
            cur += j & 1;
            j >>= 1;
        }
        if(cur > m) continue;
        e.push_back(i);
        cnt1.push_back(cur);
        d.push_back((i | (i << 1 | i >> 1)) % (1 << n));
    }

    len = e.size() - 1;

    // for(int i = 0;i <= len;i++)
    // {
    //     cout << e[i] << " " << d[i] << " " << cnt1[i] << endl;
    // }

    for(int i = 0;i <= n;i++) dp[0][i][1] = 1;
    for(int k = 1;k <= m;k++)
    {
        for(int i = 1;i <= n;i++)
        {
            for(int j = 1;j <= len;j++)
            {
                int prev = k - cnt1[j];
                if(prev < 0) continue;
                for(int p = 1;p <= len;p++)
                {
                    if((d[p] & e[j]) == 0)
                    {
                        dp[k][i][j] += dp[prev][i-1][p];
                    }
                }
            }
        }
    }

    for(int i = 1;i <= len;i++)
    {
        ans += dp[m][n][i];
    }
    cout << ans << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}